<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
xmlns:sec="http://www.springframework.org/schema/security">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>admin页面</div>
<div sec:authentication="name">用户名</div>
<div sec:authentication="principal.authorities">权限列表</div>
<div sec:authorize="isAuthenticated()">判断是否已经登录-已登录</div>
<div sec:authorize="hasRole('admin')">
    <a>'管理面'角色页面</a>
</div>
<div sec:authorize="hasRole('user')">
    <a>'用户'角色页面</a>
</div>
<div sec:authorize="hasAuthority('ROLE_admin')">
    <a>'管理面权限'角色页面</a>
</div>
<div sec:authorize="hasAuthority('ROLE_user')">
    <a>'用户'角色页面</a>
</div>
<div sec:authorize-url="/admin">
    <a>admin连接</a>
</div>
<div sec:authorize-url="/user">
    <a>user连接</a>
</div>
</body>
</html>